package com.woniuxy.yoga.product.client;

import com.woniuxy.yoga.commons.core.model.Result;
import com.woniuxy.yoga.product.client.dto.course.AloneReservationDTO;
import com.woniuxy.yoga.product.client.dto.course.CourseTypeDTO;
import com.woniuxy.yoga.product.client.dto.course.OrdinaryCourseDTO;
import com.woniuxy.yoga.product.client.form.course.AddTeamCourseForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

@FeignClient(name = "course-service",path = "/course")
public interface CourseClient {

    /**
     * 教练ID查询普通课程信息
     * @param
     * @return
     */
    @PostMapping("/ordinaryCourse/getByCoachId")
    public Result<List<OrdinaryCourseDTO>> getOrdinaryByCoachId(@RequestBody List<Integer> ids);

    /**
     * 教练ID查询预约信息
     * @param ids
     * @return
     */
    @PostMapping("/aloneReservation/getReservationByCoachId")
    public Result<List<AloneReservationDTO>> getReservationByCoachId(@RequestBody List<Integer> ids);

    /**
     * 查询课程类型
     * @param courseTypeId
     * @return
     */
    @GetMapping("/courseType/getById/{courseTypeId}")
    public Result<CourseTypeDTO> getCourseTypeById(@PathVariable("courseTypeId") Integer courseTypeId);

    /**
     * 新增团队课程
     * @param addTeamCourseForm
     * @return
     */
    @PostMapping("/teamCourse/addTeamCourse")
    public Result<?> addTeamCourse(@RequestBody AddTeamCourseForm addTeamCourseForm);
}
